{template '_header'}

        <!-- 筛选区域 -->
        <div class="panel panel-info">
            <div class="panel-heading">筛选</div>
            <div class="panel-body">
                <form action="./index.php" method="get" class="form-horizontal" role="form">
                    <input type="hidden" name="c" value="site" />
                    <input type="hidden" name="a" value="entry" />
                    <input type="hidden" name="m" value="ewei_shopv2" />
                    <input type="hidden" name="do" value="web" />
                    <input type="hidden" name="r" value="diyform.data" />
                    <input type="hidden" name="typeid" value="{$type['id']}" />
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">关键字</label>
                        <div class="col-sm-8 col-lg-9">
                            <input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}" placeholder="请输入关键字进行搜索">
                        </div>

                    </div>
               
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label"></label>
                        <div class="col-sm-8 col-lg-9">
                         <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
                        </div>

                    </div>
                </form>
            </div>
        </div>
        <div class='panel panel-default'>
            <div class='panel-heading'> 数据列表(总数:{$total}; 模板名称:{$type['title']})</div>
            <div class='panel-body'>
                <table class="table">
                    <thead>
                        <tr>
                            <th>编号</th>
                            {loop $type['fields'] $key $value}
                                <th style=''>{php echo $value['tp_name']}</th>
                            {/loop}


                            <!--<th>辑编 / 删除</th>-->

                        </tr>
                    </thead>
                    <tbody>
                        {loop $items $item}
                            <tr>
                                <td>{$item['id']}</td>

                                    {php $datas = iunserializer($item['fields'])}
                                    {loop $type['fields'] $key $value}
                                     <td>
                                         {if $value['data_type'] == 0 || $value['data_type'] == 1 || $value['data_type'] == 2 || $value['data_type'] == 6}
                                         {php echo $datas[$key]}

                                         {else if $value['data_type'] == 3}
                                         {if !empty($datas[$key])}
                                         {loop $datas[$key] $k1 $v1}
                                         {php echo $v1}
                                         {/loop}
                                         {/if}

                                         {else if $value['data_type'] == 5}
                                         {if !empty($datas[$key])}
                                         {loop $datas[$key] $k1 $v1}
                                         <a target="_blank" href="{php echo tomedia($v1)}"><img style='width:35px;height:35px;padding:1px;border:1px solid #ccc'  src="{php echo tomedia($v1)}"></a>
                                         {/loop}
                                         {/if}

                                         {else if $value['data_type'] == 7}
                                         {php echo $datas[$key]}

                                         {else if $value['data_type'] == 8}
                                         {if !empty($datas[$key])}
                                         {loop $datas[$key] $k1 $v1}
                                         {php echo $v1}
                                         {/loop}
                                         {/if}

                                         {else if $value['data_type'] == 9}
                                         {php echo $datas[$key]['province']}-{php echo $datas[$key]['city']}
                                         {/if}
                                     </td>
                                    {/loop}

                            </tr>
                        {/loop}
                        {if !empty($pager)}
                            <tr>
                                <td colspan="{php echo $colspan+7}">{$pager}</td>
                            </tr>
                        {/if}
                    </tbody>
                </table>
            </div>
            <div class='panel-footer'>
                    <a class='btn btn-default' href="{php echo webUrl('diyform/temp')}"><i class="fa fa-reply"></i> 返回列表</a>
                   
            </div>
        </div>
 
{template '_footer'}
